package com.koron.plan.web.repairplan.bean.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.koron.bean.annocation.FillField;
import com.koron.plan.web.maintainplan.bean.dto.OrderEquipPo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @author twcao
 * @title: RepairDTO
 * @projectName GDH_EAM_V2
 * @description: 计划检修工单DTO
 * @date 2022/1/189:34
 */
@Data
public class RepairDTO {

    @FillField
    @ApiModelProperty(value = "唯一id")
    private String id;

    @ApiModelProperty(value = "维护工单编码")
    private String code;

    @ApiModelProperty(value = "维护工单标题")
    private String title;

    @ApiModelProperty(value = "设备管理单位ID")
    private String deptManage;

    @ApiModelProperty(value = "设备管理单位名称")
    private String deptManageName;

    @ApiModelProperty(value = "专业")
    private String major;

    @ApiModelProperty(value = "工单性质")
    private Integer nature;

    @ApiModelProperty(value = "工单来源")
    private String source;

    @ApiModelProperty(value = "工单来源的ID")
    private String sourceId;

    @ApiModelProperty(value = "工作地点ID")
    private String location;

    @ApiModelProperty(value = "工作地点名称")
    private String locationName;

    @ApiModelProperty(value = "预计开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date startTime;

    @ApiModelProperty(value = "预计结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date endTime;

    @ApiModelProperty(value = "工作内容")
    private String context;

    @ApiModelProperty(value = "备注")
    private String marks;

    @ApiModelProperty(value = "是否需要作业表单")
    private Integer needStatus;

    @ApiModelProperty(value = "存在的问题")
    private String problem;

    @ApiModelProperty(value = "改进建议")
    private String opinion;

    @ApiModelProperty(value = "工单状态")
    private String status;

    @ApiModelProperty(value = "实际结束时间")
    private Date factEndTime;

    @FillField
    @ApiModelProperty(value = "创建人账号", hidden = true)
    private String createBy;

    @FillField
    @ApiModelProperty(value = "创建人姓名", hidden = true)
    private String createByName;

    @FillField
    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;

    @FillField
    @ApiModelProperty(value = "更新人账号", hidden = true)
    private String updateBy;

    @FillField
    @ApiModelProperty(value = "更新人姓名", hidden = true)
    private String updateByName;

    @FillField
    @ApiModelProperty(value = "更新时间", hidden = true)
    private Date updateTime;

    @FillField
    @ApiModelProperty(value = "删除标志", hidden = true)
    private Integer deleteFlag = 0;

    @FillField(alias = "orgId")
    @ApiModelProperty(value = "创建单位ID", hidden = true)
    private String deptId;

    @FillField(alias = "orgName")
    @ApiModelProperty(value = "创建单位名称", hidden = true)
    private String deptName;

    @ApiModelProperty(value = "基础信息的设备列表")
    private List<OrderEquipPo> orderEquipPoList;

    @ApiModelProperty(value = "计划id")
    private String planId;

    @ApiModelProperty(value = "计划code")
    private String planCode;
}
